Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading metadata with zeros #4795

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

emasab
Copy link
Collaborator

@emasab emasab commented Jul 25, 2024

Closes: #4649.
When retrieving offset metadata, if the binary value contained zeros
and librdkafka was configured with strndup, part of
the buffer after first zero contained uninitialized data
instead of rest of metadata. Solved by avoiding to use
strndup for copying metadata.
Happens since: 0.9.0

with HAVE_STRNDUP
@emasab emasab requested a review from a team as a code owner July 25, 2024 11:50
Copy link
Contributor

@milindl milindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me given the background. Please fix changelog

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reading committed offsets where metadata contains null byte leads to reading random data after null byte.
2 participants